{php include wl_template('common/header');}
<style type="text/css">
	.page-heading {
    padding: 5px 0;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    position: relative;
    margin-left: 15px;
    }
</style>
<ul class="nav nav-tabs" id="myTab">
	<li><a href="javascript:;">{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}等级</a></li>
</ul>

<div class="app-content">
	<div class="app-filter">
		<div class="filter-action">
			<a class="btn btn-primary" href="{php echo web_url('distribution/dissysbase/editlevel')}" data-toggle="ajaxModal">增加等级</a>
		</div>
	</div>
	<div class="alert alert-info" style="margin-bottom: 1rem;">
		<b>注意：没有设置等级的{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}将按默认等级计算提成。商品指定的佣金金额的优先级仍是最高的，也就是说只要商品指定了佣金金额就按商品的佣金金额来计算，不受等级影响</b>
	</div>
	<div class="app-table-list">
		<div class="table-responsive">
			<table class="table table-hover table-bordered">
				<thead>
				<tr>
					<th class="text-center" style="width:100px;">等级名称</th>
					<th class="text-center" style="width:100px;">一级佣金比例</th>
					{if $base['ranknum']> 1}
					<th class="text-center" style="width:100px;">二级佣金比例</th>
					{/if}
					{if $base['ranknum']> 2}
					<th class="text-center" style="width:100px;">三级佣金比例</th>
					{/if}
					<th class="text-center" style="width:50px;">等级层级</th>
<!--					<th class="text-center" style="width:100px;">升级条件</th>-->
					<th class="text-center" style="width:100px;">操作</th>
				</tr>
				</thead>
				<tbody>
				{loop $levels $item}
				<tr class="text-center" >
					<td>
						{$item['name']}{if $item['isdefault'] == 1}[默认等级]{/if}
					</td>
					<td>{$item['onecommission']}%</td>
					{if $base['ranknum']> 1}
					<td>{$item['twocommission']}%</td>
					{/if}
					{if $base['ranknum']> 2}
					<td>{$item['threecommission']}%</td>
					{/if}
					<td>{$item['levelclass']}</td>
<!--					<td>{if $item['isdefault'] == 1}-->
<!--						默认等级-->
<!--						{else}-->
<!--						{if  $item['upstandard'] }-->
<!--						{if $base['levelupstatus'] == 0 || empty($base['levelupstatus'])}-->
<!--						已结算佣金总金额大于{$item['upstandard']}元-->
<!--						{/if}-->
<!--						{if $base['levelupstatus'] == 1}-->
<!--						下线总人数满{$item['upstandard']}人-->
<!--						{/if}-->
<!--						{if $base['levelupstatus'] == 2}-->
<!--						一级下线人数满{$item['upstandard']}人-->
<!--						{/if}-->
<!--						{if $base['levelupstatus'] == 3}-->
<!--						下线{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}人数满{$item['upstandard']}人-->
<!--						{/if}-->
<!--						{if $base['levelupstatus'] == 4}-->
<!--						一级{if Customized::init('distributionText') > 0}共享股东{else}分销商{/if}人数满{$item['upstandard']}人-->
<!--						{/if}-->
<!--						{if $base['levelupstatus'] == 5}-->
<!--						自购订单金额大于{$item['upstandard']}元-->
<!--						{/if}-->
<!--						{else}-->
<!--						不自动升级-->
<!--						{/if}-->
<!--						{/if}-->
<!--					</td>-->
					<td style="position:relative;">
						<a href="{php echo web_url('distribution/dissysbase/editlevel',array('id'=>$item['id']))}" data-toggle="ajaxModal">编辑  </a>
						{if $item['isdefault'] != 1} - <a data-toggle="ajaxRemove" href="{php echo web_url('distribution/dissysbase/deletelevel',array('id'=>$item['id']));}" data-confirm='确认删除此等级？'>删除  </a>{/if}
					</td>
				</tr>
				{/loop}
				</tbody>
			</table>
		</div>
		<div class="app-table-foot clearfix">
			<div class="pull-left">
				
			</div>
			<div class="pull-right">
				{$pager}
			</div>
		</div>
	</div>
</div>

{php include wl_template('common/footer');}